<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>随机点名</title>
	</head>
	<body>
		<h1>~点名系统~</h1>
		<input type="button" id="b" value="开始" onclick="start"/>
		<p id="c"></p>
		<script type="text/javascript">
			function start(){
				var arr=new Array('1 张三','2 李四','3 王五','4 赵六');
				var n=Math.random()*4+1;
				var num=parseInt(n);
				c.innerHTML=arr[num];
			}
			
		</script>
	</body>
</html>
